'use strict'

var arr = [1,2,3,4,5,6,7,8,9]

arr.soft1Sort = function(){
    for(var j = 0; j < this.length; i++){
        var item = this[j]
        var idx = 0
        for (var i= j+1;i < this.length; i++){
            if(this[i]<item){
                item = this[i]
                idx=i
            }
        }
        if (this [j] !== item){
            var a =this[j]
            this[j]=this[idx]
            this[idx] = a
        }
        console.log(arr)
    }
}
arr.soft1Sort(function(a,b){
    return a>b;// + - * /
})